home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk5 / less1.3 / makefile < prev    next >
Makefile  |  1995-03-18  |  5KB  |  162 lines

  1. # Makefile for "less"
  2. #
  3. # Invoked as:
  4. #    make all
  5. #   or    make install
  6. # Plain "make" is equivalent to "make all".
  7. #
  8. # If you add or delete functions, remake funcs.h by doing:
  9. #    make newfuncs
  10. # This depends on the coding convention of function headers looking like:
  11. #    " \t public <function-type> \n <function-name> ( ... ) "
  12. #
  13. # Also provided:
  14. #    make lint    # Runs "lint" on all the sources.
  15. #    make clean    # Removes "less" and the .o files.
  16. #    make clobber    # Pretty much the same as make "clean".
  17.  
  18.  
  19. ##########################################################################
  20. # System-specific parameters
  21. ##########################################################################
  22.  
  23. # (AMIGA ONLY) if you have a single drive system you have to put
  24. #  the system disk back in if you have no 'set' vars
  25. #  otherwise we can use this var
  26. NO_GETENV = 1
  27.  
  28. # Define XENIX if running under XENIX 3.0
  29. XENIX = 0
  30.  
  31. # VOID is 1 if your C compiler supports the "void" type,
  32. # 0 if it does not.
  33. VOID = 1
  34.  
  35. # offset_t is the type which lseek() returns.
  36. # It is also the type of lseek()'s second argument.
  37. offset_t = long
  38.  
  39. # STAT is 1 if your system has the stat() call.
  40. STAT = 0
  41.  
  42. # PERROR is 1 if your system has the perror() call.
  43. # (Actually, if it has sys_errlist, sys_nerr and errno.)
  44. PERROR = 1
  45.  
  46. # TERMIO is 1 if your system has /usr/include/termio.h.
  47. # This is normally the case for System 5.
  48. # If TERMIO is 0 your system must have /usr/include/sgtty.h.
  49. # This is normally the case for BSD.
  50. TERMIO = 0
  51.  
  52. # SIGSETMASK is 1 if your system has the sigsetmask() call.
  53. # This is normally the case only for BSD 4.2,
  54. # not for BSD 4.1 or System 5.
  55. SIGSETMASK = 1
  56.  
  57. ##########################################################################
  58. # Optional and semi-optional features
  59. ##########################################################################
  60.  
  61. # REGCMP is 1 if your system has the regcmp() function.
  62. # This is normally the case for System 5.
  63. # RECOMP is 1 if your system has the re_comp() function.
  64. # This is normally the case for BSD.
  65. # If neither is 1, pattern matching is supported, but without metacharacters.
  66. REGCMP = 0
  67. RECOMP = 0
  68.  
  69. # SHELL_ESCAPE is 1 if you wish to allow shell escapes.
  70. # (This is possible only if your system supplies the system() function.)
  71. SHELL_ESCAPE = 1
  72.  
  73. # EDITOR is 1 if you wish to allow editor invocation (the "v" command).
  74. # (This is possible only if your system supplies the system() function.)
  75. # EDIT_PGM is the name of the (default) editor to be invoked.
  76. EDITOR = 1
  77. EDIT_PGM = ed
  78.  
  79. # GLOB is 1 if you wish to have shell metacharacters expanded in filenames.
  80. # This will generally work if your system provides the "popen" function
  81. # and the "echo" shell command.
  82. GLOB = 0
  83.  
  84. # LOGFILE is 1 if you wish to allow the -l option (to create log files).
  85. LOGFILE = 0
  86.  
  87. # ONLY_RETURN is 1 if you want RETURN to be the only input which
  88. # will continue past an error message.
  89. # Otherwise, any key will continue past an error message.
  90. ONLY_RETURN = 0
  91.  
  92.  
  93. ##########################################################################
  94. # Compilation environment.
  95. ##########################################################################
  96.  
  97. # LIBS is the list of libraries needed.
  98. LIBS = -lc
  99.  
  100.  
  101. # OPTIM is passed to the compiler and the loader.
  102. # It is normally "-O" but may be, for example, "-g".
  103. OPTIM = 
  104.  
  105.  
  106. ##########################################################################
  107. # Files
  108. ##########################################################################
  109.  
  110. SRC1 =    main.c option.c prim.c ch.c position.c input.c output.c 
  111. SRC2 =    screen.c prompt.c line.c signal.c os.c help.c ttyin.c command.c version.c
  112. SRCAMIGA = print.c io.c
  113.  
  114. SRC =    $(SRC1) $(SRC2) $(SRCAMIGA)
  115. OBJ =    main.o option.o prim.o ch.o position.o input.o output.o screen.o \
  116.     prompt.o line.o signal.o os.o help.o ttyin.o command.o version.o \
  117.     print.o io.o
  118.  
  119.  
  120. ##########################################################################
  121. # Rules
  122. ##########################################################################
  123.  
  124. DEFS =    -DTERMIO=$(TERMIO) \
  125. -DSIGSETMASK=$(SIGSETMASK) \
  126. -Doffset_t=$(offset_t) -DVOID=$(VOID) \
  127. -DEDITOR=$(EDITOR) -DEDIT_PGM=$(EDIT_PGM) \
  128. -DLOGFILE=$(LOGFILE) -DSHELL_ESCAPE=$(SHELL_ESCAPE) \
  129. -DONLY_RETURN=$(ONLY_RETURN) \
  130. -DGLOB=$(GLOB) \
  131. -DSTAT=$(STAT) \
  132. -DPERROR=$(PERROR) \
  133. -DAMIGA=1 -DNO_GETENV=$(NO_GETENV)
  134.  
  135. CFLAGS = $(OPTIM) $(DEFS) -n
  136.  
  137.  
  138. less: $(OBJ)
  139.     ln -g $(OPTIM) -o less $(OBJ) $(LIBS)
  140.  
  141.  
  142. $(OBJ): less.h funcs.h
  143.  
  144. # help.o depends on makefile for the definition of HELPFILE.
  145. help.o: makefile
  146.  
  147.  
  148. newfuncs:
  149.     mv funcs.h funcs.h.OLD
  150.     awk -f mkfuncs.awk $(SRC) >funcs.h
  151.  
  152. clean:
  153.     rm -f $(OBJ) less
  154.  
  155. clobber:
  156.     rm -f *.o less install_less install_man install_help
  157.  
  158. shar:
  159.     shar -v install less.man makefile.* > less.shar.a
  160.     shar -v less.nro $(SRC1) > less.shar.b
  161.     shar -v README less.help *.h *.awk $(SRC2) > less.shar.c
  162.